package com.gitee.wsl.scheduler.job

interface KJobFactory<Kj : KJob, KjConfig : KJob.Configuration> {
    fun create(configure: KjConfig.() -> Unit): KJob
}

fun <Job : KJob, Config : KJob.Configuration> kjob(
    factory: KJobFactory<Job, Config>,
    configure: Config.() -> Unit = {}
): KJob {
    return factory.create(configure)
}

